package com.easidea.tim.dao.system.orgnization;

import java.util.List;

import org.springside.core.dao.extend.HibernateEntityExtendDao;

import com.easidea.tim.entity.system.orgnization.StaffTeamwork;

public class StaffTeamworkDao extends HibernateEntityExtendDao<StaffTeamwork>{
 
	public int deleteStaffTeamworkByParentId(Long parentId) {
		String hql = "delete from " + StaffTeamwork.class.getName() + " where parentId = "+parentId;
		return this.getHibernateTemplate().bulkUpdate(hql);
	}
	@SuppressWarnings("unchecked")
	public List<Long> getTeamworkIdByParentId(Long parentId) {
	 String hql = "select childId from "+StaffTeamwork.class.getName()  + " where parentId = "+parentId;
	 return this.getHibernateTemplate().find(hql);
	}
 
}
